<script>
	export default {
		onLaunch: function() {
			console.log('App Launch')
		},
		onShow: function() {
			const init = uni.getStorageSync('init');
			if (!init) {
				const rect = wx.getMenuButtonBoundingClientRect();
				uni.setStorageSync('rect', rect);
				console.log('rect', rect);
			}
			const token = uni.getStorageSync('token');
			if (!token) {
				uni.redirectTo({
					url: '/pages/login/index'
				});
			}
		},
		onHide: function() {
			console.log('App Hide')
		}
	}
</script>

<style>
	/*每个页面公共css */
	.page {
		width: 100vw;
		height: 100vh;
		overflow: hidden;
	}
</style>
